<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('phpcms','header'); ?>
<div id="main">
  <!--begin left-->
  <div id="main_l">
    <!--位置导航-->
    <div id="position"><a href="">首页</a><a href="<?php echo $M['url'];?>">专题</a><a href="<?php echo $M['url'];?><?php echo $TYPE[$typeid]['url'];?>"><?php echo $TYPE[$typeid]['name'];?></a><?php echo str_cut($title,65);?></div>
  <?php if($banner) { ?><div style="margin:10px 0 10px 0;"><img src="<?php echo $banner;?>" height="120" width="650" style="border:1px solid #CCCCCC;padding:1px;"/></div><?php } ?>
    <div class="special_txt">
        <h1><span class="c_orange"><?php echo $title;?></span></h1>
        <img src="<?php echo $thumb;?>" height="185" width="300" style="border:1px solid #CCCCCC;padding:1px;"/><p><?php echo $description;?></p>
      <div class="clear"></div>
    </div>
    <?php echo block("specialid_$specialid", 1);?>
    <?php echo block("specialid_$specialid", 2);?>
<!--专题文章start-->
<div class="cat_index clear">
      <div class="cat_title"><a href="<?php echo $MODULE['special']['url'];?>special.php?specialid=<?php echo $specialid;?>"><img alt="更多" src="images/more.gif"/></a>
        <h3>最新信息</h3>
      </div>
      <div class="cat_left">
        <ul class="pic_list">
          <?php $DATA = get("SELECT * FROM `phpcms_special_content` AS a, `phpcms_content` AS b WHERE a.contentid = b.contentid AND b.thumb != '' AND a.specialid =$specialid ORDER BY  b.contentid DESC", 8, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
          <li><a target="_blank" href="<?php echo $r['url'];?>"><img height="62" width="90" alt="<?php echo $r['title'];?>" src="<?php echo $r['thumb'];?>"/></a><br/>
          <a target="_blank" href="<?php echo $r['url'];?>"><span class="c13 b"><?php echo str_cut($r[title],13);?></span></a>
         </li>
         <?php } unset($DATA); ?>
        </ul>
      </div>
      <div class="cat_right">
        <ul class="text_list">
        <?php $DATA = get("SELECT * FROM `phpcms_special_content` AS a, `phpcms_content` AS b WHERE a.contentid = b.contentid AND a.specialid =$specialid ORDER BY  b.contentid DESC", 16, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
           <li><span class="date"><?php echo date('Y-m-d',$r[inputtime]);?></span><a target="_blank" href="<?php echo $r['url'];?>"><?php echo str_cut($r[title],40);?></a></li>
        <?php } unset($DATA); ?>
        </ul>
      </div>
</div>
<div class="clear"></div>
<!--专题文章end-->
<!--begin comment-->
<?php if(isset($MODULE[comment])) { ?>
<?php list($keyid, $verify) = keyid_make('special', 'special', 'title', $specialid);?>
<div id="commnent_tag">
     <a href="<?php echo $MODULE['comment']['url'];?>?keyid=<?php echo $keyid;?>&verify=<?php echo $verify;?>">
     <img src="images/comment.gif" />
        已有<strong class="c_red"><span id="comments">0</span></strong>位网友发表了看法</a>
</div>
<div class="commenttext" style="text-align:center;margin-top:2%">
   <form action="<?php echo $MODULE['comment']['url'];?>?action=addpost" method="post" onSubmit="return checkForm();">
<input type="hidden" name="keyid" value="<?php echo $keyid;?>"/>
<input type="hidden" name="verify" value="<?php echo $verify;?>"/>
<ul>
          <li>
            <textarea cols="100" rows="8" name="comment" id="comment" onfocus="reply_clearfield()" onblur="reply_restoration()"></textarea>
          </li>
          <li style="text-align:left;margin-left:1%;margin-top:1%;">
            <span id="checker"><div style="float:left">验证码：</div><input type="text" style="ime-mode: disabled;" size="6" id="checkcode" name="checkcode" /><img src="" id="code_img" style="display:none" onclick="this.src='checkcode.php?'+Math.random()" alt="点击换一张"></span>
            <input id="dosubmit" name="dosubmit" type="submit" value="发表评论" />
          </li>
        </ul>
        </form>
      </div>
      <script type="text/javascript" src="data/js/comment_setting.js"></script>
      <script type="text/javascript">
      <!--
        $().ready(function() {
            if(setting.ischecklogin == 0 && getcookie('auth') === null)
            {
                $('#comment').val("请您登陆后发表评论！");
                $('#comment').attr("disabled","disabled");
                $('#dosubmit').attr("disabled","disabled");
            }
            else 
            {
                $('#comment').val("我也来说两句！");
            }
        });
        function reply_restoration()
        {
            if($('#comment').val() == '')
            {
                $('#comment').val("我也来说两句！");
            }
        }
        function reply_clearfield()
        {
            if ($('#comment').val() == "我也来说两句！") 
            {
                $('#comment').val("");
            }
document.getElementById('code_img').style.display = 'block';document.getElementById('code_img').src='checkcode.php';
        }
        function checkForm()
        {
            if($('#comment').val() == '' || $('#comment').val() == "我也来说两句！")
            {
                alert("内容不能为空");
                $('#comment').focus();
                return false;
            }
            if($('#checkcode').val() == '' )
            {
                alert("验证码不能为空");
                $('#checkcode').focus();
                return false;
            }
            if ($('#comment').val().length > 1000) 
            {
                alert("内容太长，最多 1000 个文字");
                return false;
            }
        }
      //-->
      </script>
    <?php } ?> 
  <!--end comment-->
    </div>
  <!--begin right-->
  <div id="main_r">
    <?php echo block("specialid_$specialid", 3);?>
  </div>
  <!--end right-->
</div>
<script language="JavaScript" src="count.php?specialid=<?php echo $specialid;?>"></script>
<?php include template('phpcms','footer'); ?>